<script setup>
import Post from "./components/Post.vue";
import { ref } from "vue";
const obj = ref({ id: 1, name: "rookie", role: "admin" });
console.log(obj.value.role);
const changeFn = () => {
  console.log("点了");
  obj.value.role = "isNotAdmin";
};
</script>
<template>
  <Post v-roles="obj.role" />
  <button v-roles="'admin'" @click="changeFn">我是无敌小子</button>
</template>

<style></style>

